<template>
	<view>
		<view class="cell">
			<view
				class="title"
				@click="changeShow">
				<text>{{ dataobj.name }}</text>
				<image
					v-if="isShow"
					src="https://img.2024csnl.com/static/2.x/a71.png"
					mode="">
				</image>
				<image
					v-else
					src="https://img.2024csnl.com/static/2.x/a72.png"
					mode="">
				</image>
			</view>
			<view
				v-show="isShow"
				class="content">
				<view v-html="dataobj.content"></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			dataobj: {
				type: Object,
				default: _ => ({})
			}
		},
		data() {
			return {
				isShow: false,
				rich: ''
			}
		},
		methods: {
			changeShow () {
				this.isShow = !this.isShow
			}
		}
	}
</script>

<style scoped lang="less">
	.cell {
		position: relative;
		border-top: 1px solid #eeeeee;
		padding: 20rpx 0;
		.title {
			line-height: 40rpx;
			padding: 10rpx 0;
			color: #333;
			display: flex;
			align-items: center;
			text {
				flex: 1;
			}
			image {
				display: block;
				width: 36rpx;
				height: 36rpx;
			}
		}
		.content {
			line-height: 40rpx;
			color: #999;
			word-break: break-all;
			margin-top: 10rpx;
		}
	}
</style>
